<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>编辑交易</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  
    {include file="public/css"}
    {include file="public/js"}
    <link rel="stylesheet" type="text/css" href="__PLUGIN__/steps/steps.css" />
</head>
<body>
<!-- 后台面包屑导航 -->
{:get_admin_breadcrumb()}
<blockquote class="layui-elem-quote">订单信息</blockquote>
<div class=""  style="padding:20px">


<form class="layui-form" action="" method="post" >
<input type="hidden" name="id" value="{$Request.param.id}">

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;">订单状态</label>
                <div class="layui-input-inline" >
     <div class="layui-form-mid layui-word-aux"> {:get_trade_status($guarantee.order_status,$guarantee.pay_status,$guarantee.shipping_status)}
     </div>
                   
                </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 交易标题</label>
                <div class="layui-input-inline" style="padding:8px">
                  {$guarantee.title}
                </div>
                
              </div>

             <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 买家信息 </label>
                <div class="layui-input-inline" style="padding:8px">
                    {$guarantee.buyer}
                  </div>

              </div>
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 卖家信息 </label>
                <div class="layui-input-inline" style="padding:8px">
                   {$guarantee.seller}
                </div>
          
              </div>
               <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 交易价格</label>
                <div class="layui-input-inline" style="padding:8px">
                 <span class="orange"> {$guarantee.price}</span>元
                </div>
                 <div class="layui-form-mid layui-word-aux"></div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 手续费</label>
                <div class="layui-input-inline" style="padding:8px">
                   {if $guarantee.fee_ratio >0}{$guarantee.fee_ratio} %{else}免手续费{/if}
                </div>
              
              </div>


  <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 手续费支付方式 </label>
                <div class="layui-input-block" style="padding:8px">
                 {if  $guarantee.fee_type == 1 }
                 买家全付
                 {elseif $guarantee.fee_type == 2/}
                 卖家全付
                 {elseif $guarantee.fee_type == 3/}
                 双方各付一半
                 {/if}
                </div>
                 <div class="layui-form-mid layui-word-aux"></div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 实际结算 </label>    
            <div class="layui-input-block" id="result" style="padding:8px">买家支付 <span class="orange">{$guarantee.buyer_pay} </span> 元 卖家获得 <span class="orange">{$guarantee.seller_get} </span> 元</div>
                 <div class="layui-form-mid layui-word-aux"></div>
              </div>
              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"> 担保内容</label>
                <div class="layui-input-block" style="padding:8px">
                 {form:ueditor name="content" value="htmlspecialchars_decode($guarantee['content'])"}
                </div>
              </div>
              {if $guarantee.shipping_status  ==1}
              <blockquote class="layui-elem-quote">已发货</blockquote>
              <div class="layui-form-item">
                <label class="layui-form-label">发货文件下载</label>
                <div class="layui-input-block">
                  {if !empty($guarantee.file)}
                  <div class="layui-form-mid layui-word-aux"><i class="layui-icon layui-icon-file-b"></i><a href="{$guarantee.file}" download="{$guarantee.file}">附件下载</a></div>
                  {else}
                  <div class="layui-form-mid layui-word-aux">暂无附件</div>
                  {/if}
                </div>
              </div>

              <div class="layui-form-item">
                <label class="layui-form-label">验收状态</label>
               <div class="layui-input-inline">
                <select name="shipping_status" lay-verify="required">
                  <option value="0">未确认</option>
                  <option value="1">确认验收</option>
  
                </select>
              </div>
  
            </div>

             {/if}

         

              <div class="layui-form-item">
                <label class="layui-form-label" style="width:100px;"></label>
                <div class="layui-input-inline">
                   <button class="layui-btn layui-btn-normal"  lay-submit lay-filter="form">确 定</button>
                    <a class="layui-btn layui-btn-primary"  onclick="back()">返 回</a>
                </div>
              </div>


</form>
</div>

<script>
layui.use(['element', 'layer','form','upload'], function(){
   var  element = layui.element, layer = layui.layer,form = layui.form;;upload = layui.upload;


 //监听提交
  form.on('submit(form)', function(data){
    $.post("{:url('guarantee/edit')}",$("form").serialize(),function(json){
      if(json.code == 0){
        qilecms.success(json.msg);
        setTimeout(function(){
         qilecms.back();
        },1000);
        }else{
          qilecms.error(json.msg);
        }
    });
     return false;
  });



});

</script>
<script>

</script>
</body>

</html>